<?php
namespace app\together\controller;
use app\together\model\User as UserModel;
use think\Controller;

class Index extends Controller
{
    //载入登录注册页面
    public function index()
    {
        return $this->fetch();
    }
    public function register_check()
    {
        $username=$_GET['username'];
        $user=UserModel::where('username',$username)->column('username');
        if($user == ''){
            return json(['msg'=>'1']);
        }else{
            return json(['msg'=>'2']);
        }

    }
    //登录方法
    public function login()
    {

    }
    //注册方法
    public function register()
    {

    }
}
